<script>
  //---------------------------------------------
  function closeComment()
  {
    $('popCommentaire').hide();
    masqueModal();
  }
  //---------------------------------------------
  function valideComment()
  {
    top.principale.PagePrincipale.$($F('returnVal')).value = $F('commentaire');
    modifieImageComment(($F('commentaire') == ''));
    closeComment();
  }
  //---------------------------------------------
  function modifieImageComment(isVide) 
  {
    var etatImage = "comment";
	  if( isVide ) etatImage += "_vide";

	  top.principale.PagePrincipale.$($F('imgComment')).src = "/PariGest/pages/ihm/boutons/" + etatImage +"0.png";
	  top.principale.PagePrincipale.$($F('imgComment')).onmouseover = function(){rollBtn(this,  etatImage +'1');};
	  top.principale.PagePrincipale.$($F('imgComment')).onmouseout = function(){rollBtn(this,  etatImage +'0');};
  }
  
</script>
<?php
  $ht=6;
  $dec="-2";
  if ($NAVIGATEUR=="MOZ")
  { $ht=5;
    $dec="-4";
  }
?>
<!-- popup commentaire -->
<div id=popCommentaire style="z-index:9001;position:absolute;top:298;left:398;display:none;width:300;height:170;background:#AAAAAA;">
<div style="border-style:solid;border-width:1px;border-color:#AAAAAA;position:relative;top:<?php echo $dec ?>;left:<?php echo $dec ?>;width:300;height:170;background:#FFFFFF;">
  <input type=hidden id=returnVal value="">
  <input type=hidden id=imgComment value="">
  <table width=100% cellspacing=0 cellpadding=0 border=0>
    <tr align=center height=22 class="titrePopup">
      <td width=100% class="entete grand cursmove" id=enteteCommentaire><?php if( isset($class) ) { echo $titrePopup; } else { echo "Commentaire"; } ?></td>
      <td>
        <img src="/PariGest/pages/ihm/boutons/close0.png" class=cursmain onmouseover="rollBtn(this,'close1')" title="Fermer la fenêtre" onmouseout="rollBtn(this,'close0')" id=btClose name=btClose onclick=closeComment()>
      </td>
      <td>&nbsp;</td>
    </tr>
    <tr height=10><td colspan=3></td></tr>
    <tr>
      <td colspan=3 align=center><textarea style="width:280" rows=<?php echo $ht ?> id=commentaire class="text grisf normal <?php if( isset($class) ) {echo $class;} ?>" <?php if( isset($read) ) {echo $read;} ?>></textarea></td>
    </tr>
    <tr height=5><td colspan=3></td></tr>
    <tr height=30 align=center>
      <td colspan=3>
        <img style="vertical-align:top;" src="/PariGest/pages/ihm/boutons/valider0.png" class=cursmain onmouseover="rollBtn(this,'valider1')" title="Valider" onmouseout="rollBtn(this,'valider0')" id=btValide name=btValide onclick=valideComment()>
        &nbsp;&nbsp;&nbsp;<img style="vertical-align:top;" src="/PariGest/pages/ihm/boutons/annuler0.png" class=cursmain onmouseover="rollBtn(this,'annuler1')" title="Annuler" onmouseout="rollBtn(this,'annuler0')" id=btAnnule name=btAnnule onclick=closeComment()>
      </td> 
    </tr>
  </table>
</div>
</div>

<script>
  new Draggable('popCommentaire',{ handle:'enteteCommentaire'});
</script>
<!-- fin popup commentaire -->
